<#assign base=request.contextPath />
<#assign oneLabel="ERP管理">

<#assign twoLabel="出库管理">
<#assign twoUrl=base+"/sellOrders/list">

<#assign leafLabel="出库记录">

<!DOCTYPE html>
<html lang="en">
<head>
	<#include "/commons/headImport.ftl">
</head>
<body>
<#include "/commons/header.ftl">
<form class="form-horizontal" name="formName">
<div class="row">
	<div class="col-xs-12">
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">物料名称</label>
			<div class="col-sm-4">
				<input type="text" name="qxmaterielName" value="${queryVO.qxmaterielName!''}" class="col-sm-8" />
			</div>
			<label class="col-sm-2 control-label no-padding-right">规格型号</label>
			<div class="col-sm-4">
				<input type="text" name="qxmaterielSpec" value="${queryVO.qxmaterielSpec!''}" class="col-sm-8" />
			</div>
		</div>
		<div class="space-4"></div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right">出库时间</label>
			<div class="col-sm-4">
				<div class="row">
					<div class="col-xs-8 col-sm-11">
						<div class="input-daterange input-group">
							<input type="text" readonly="true" class="input-sm form-control date-picker" name="qxstartDate" 
                            	value="${(queryVO.qxstartDate?string("yyyy-MM-dd"))!''}"/>
							<span class="input-group-addon">
								<i class="fa fa-exchange"></i>
							</span>

                            <input type="text" readonly="true" class="input-sm form-control date-picker" name="qxendDate" 
                            	value="${(queryVO.qxendDate?string("yyyy-MM-dd"))!''}"/>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-4orm-group center">
				<button class="btn btn-xs btn-success" type="button" id="search_id" url="${base}/sellOrders/list">
					<i class="icon-search icon-on-right bigger-110"></i>查询
				</button>
				<button class="btn btn-xs" type="reset" id="reset_id" url="${base}/sellOrders/list">
					<i class="icon-undo bigger-110"></i>重置
				</button>
			</div>
		</div>
		<div class="space-4"></div>
	
		<div class="table-responsive">
			<p>
				<a class="btn btn-minier btn-success" href="javascript:get('${base}/sellOrders/export');">
					<i class="icon-download bigger-110"></i>导出数据
				</a>
			</p>
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th class="center" width="5%">#</th>
						<th width="10%">物料名称</th>
						<th width="10%">规格型号</th>
						<th width="6%">数量</th>
						<th width="10%">单价</th>
						<th width="10%">总价</th>
						<th width="17%">备注</th>
						<th width="10%"><i class="icon-time bigger-110 hidden-480"></i>出库时间</th>
						<th width="8%">出库人</th>
						<th width="14%">创建时间</th>
					</tr>
				</thead>
				<tbody>
				<#if pr??>
					<#list pr.data as data>									
					<tr>
						<td class="center">${data_index+1}</td>
						<td>${data.materielName!'--'}</td>
						<td>${data.materielSpec!'--'}</td>
						<td>${data.quantity!'--'}</td>
						<td>${((data.unitPrice/100.0)?string.currency)!'--'}</td>
						<td>${((data.quantity*(data.unitPrice/100))?string.currency)!'--'}</td>
						<td title="${data.remark}">
							<#if (data.remark?length > 10)>${data.remark?substring(0,9)}...<#else>${data.remark}</#if>
						</td>
						<td>${(data.sellDate?string('yyyy/MM/dd'))!'--'}</td>
						<td>${(data.createdBy)!}</td>
						<td>${(data.gmtCreate?string('yyyy/MM/dd HH:mm:ss'))!}</td>
					</tr>
					</#list>
				</#if>
				<#if ((pr.data)?size==0)>
					<tr>
						<td colspan="88" class="center">没有查询任何数据</td>
					</tr>
				</#if>
				</tbody>
			</table>
			<@p.p pageParam=pr toURL="${base}/sellOrders/list" formName="formName"/>
		</div><!-- /.table-responsive -->
	</div><!-- /span -->
</div><!-- /row -->
</form>
<#include "/commons/footer.ftl">
<script src="${base}/static/layer/layer.js"></script>
<script src="${base}/static/assets/js/date-time/bootstrap-datepicker.min.js"></script>
<script src="${base}/static/assets/js/date-time/bootstrap-datepicker.zh-CN.js"></script>
<script>
	jQuery(function($) {
		$('.date-picker').datepicker({
	   		language: 'zh-CN',//选择语言
			autoclose: true,
			todayHighlight: true,
			dateFormat: 'yy-mm-dd ',
			clearBtn: true  //添加清除按钮，可选值：true/false
		});
	});
</script>
</body>
</html>
